package DMSXL._2023Before.Array;

/*import 代码随想录.之前.ListNode_.ListNode;

public class Stack_ {
    public static void main(String[] args) {
        Linkliststack stack = new Linkliststack();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.pop();
        stack.pop();
        stack.pop();
    }
}
class Linkliststack{
    private ListNode stackpeek;
    private int stacksize = 0;

    public Linkliststack(){
        stackpeek = null;
    }

    public int size(){
        return stacksize;
    }

    public boolean isempty(){
        return size() == 0;
    }

    public void push(int i){
        ListNode listNode = new ListNode(i);
        listNode.next = stackpeek;
        stackpeek = listNode;
        stacksize++;
    }

    public void pop(){
        if(!isempty()){
            int num = stackpeek.x;
            stackpeek = stackpeek.next;
            stacksize--;
            System.out.println(num);
        }
    }
}*/